<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
#parse("/linkandscript.html")
<title>帖子视图 $!title</title>
</head>
<body>


    #parse("/postlistheader.html")
    
    <div id="postsdiv">
        <table id="posttable">
          #set($i = 0)
          #foreach($post in $posts)
          #set($i = $i+1)
          <tr id='tr$post.getPostid()' title="下载于$post.getTimeago()前,标记图片数为$post.getMarkedimgnum() ,总图片数为 $!post.getEffectiveimgnum()">
            <td class="postseq" width="40px">$i. </td>
            <td width="40px">$post.getForumid()</td>
            <td class="state"  width="90px">
            	$post.getMarkedimgstate()
            </td>
            
            <td title="">
                <a style="text-decoration:none; font-size:18px; color:#030;" 
                	href="/hezi/postlist?forum=$post.getForumid()&action=viewcontent&postid=$post.getPostid()"
                 	target="_blank" title="$post.getHealthstate()">$post.getPosttitle()</a>
                <a href="$post.getPosturl()" target="_blank">原帖</a>
                <a href="/hezi/postlist?forum=$post.getForumid()&action=viewimages&postid=$post.getPostid()" 
                	target="_blank">图片情况</a>
                <a href="/hezi/postlist?forum=$post.getForumid()&action=deletepost&postid=$post.getPostid()" 
                	target="_blank">删除帖子</a>
                <span  style="float:right">
                	 $!post.getFormatedLinks()	 
                </span>
            </td>  
            <td width="80px" style1="border:#333 1px solid">
           		 <span  style="float:right">
            	<a id="processbtn$post.getPostid()" class="btn postoperation makedone" postid="$post.getPostid()" posturl="$post.getPosturl()" forum="$post.getForumid()" >处理完成</a>
                </span>
            </td>
          </tr>
          #end
        </table>
    </div>

</body>
<script type="text/javascript">
$(function(){
   
	$(".makedone").live('click', function(){
		postid = $(this).attr("postid");
		forum =  $(this).attr("forum");
		$("#tr"+postid).remove();
		//$("." + itemid + " .zhuangtai").val(actiontype);
        $.get("/hezi/postlist?action=processed&postid="+postid,function(data){
			console.log(data);
			notice(data); 
		});
		
		var jsonobj = {};
		jsonobj.action = "processpost";
		jsonobj.posturl = $(this).attr("posturl")
		jsonobj.context = " post " + $(this).attr("posturl")
		sendmsgtoubserver(jsonobj);
    });	
	
	
	$("#posttable tr").hover(function(){
			$(this).find(".postoperation").show();
			$(this).addClass("highlighttr");
		},
		function(){
      	 	$(this).find(".postoperation").hide();
			$(this).removeClass("highlighttr");
        }
    );	

	
})



</script>

<style>
#posttable a.postoperation {
	display:none;
	text-decoration:none;
	background-color:#3498db;
	color:#FFF;
	font-size: 16px;
	cursor:pointer;
	padding:4px 6px 8px; /* Links */
}

#postsdiv td{
	height:30px;
}
.timeago, .state, .markedimagestate{
color: #999;
font-size: 10px;
}


</style>
</html>
